<div class="matches view">
<h2><?php  echo __('Match');?></h2>
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($match['Match']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Stadium'); ?></dt>
		<dd>
			<?php echo $this->Html->link($match['Stadium']['name'], array('controller' => 'stadia', 'action' => 'view', $match['Stadium']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Opponent  Country'); ?></dt>
		<dd>
			<?php echo $this->Html->link($match['Opponent_Country']['name'], array('controller' => 'countries', 'action' => 'view', $match['Opponent_Country']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Tournament'); ?></dt>
		<dd>
			<?php echo $this->Html->link($match['Tournament']['name'], array('controller' => 'tournaments', 'action' => 'view', $match['Tournament']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Date'); ?></dt>
		<dd>
			<?php echo h($match['Match']['date']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Match'), array('action' => 'edit', $match['Match']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Match'), array('action' => 'delete', $match['Match']['id']), null, __('Are you sure you want to delete # %s?', $match['Match']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Matches'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Match'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Stadia'), array('controller' => 'stadia', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Stadium'), array('controller' => 'stadia', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Tournaments'), array('controller' => 'tournaments', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Tournament'), array('controller' => 'tournaments', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Countries'), array('controller' => 'countries', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Opponent  Country'), array('controller' => 'countries', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Benches'), array('controller' => 'benches', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Bench'), array('controller' => 'benches', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Events'), array('controller' => 'events', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Event'), array('controller' => 'events', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Line Ups'), array('controller' => 'line_ups', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Line Up'), array('controller' => 'line_ups', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Benches');?></h3>
	<?php if (!empty($match['Bench'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Player Id'); ?></th>
		<th><?php echo __('Position Id'); ?></th>
		<th><?php echo __('Number'); ?></th>
		<th><?php echo __('Match Id'); ?></th>
		<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($match['Bench'] as $bench): ?>
		<tr>
			<td><?php echo $bench['id'];?></td>
			<td><?php echo $bench['player_id'];?></td>
			<td><?php echo $bench['position_id'];?></td>
			<td><?php echo $bench['number'];?></td>
			<td><?php echo $bench['match_id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'benches', 'action' => 'view', $bench['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'benches', 'action' => 'edit', $bench['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'benches', 'action' => 'delete', $bench['id']), null, __('Are you sure you want to delete # %s?', $bench['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Bench'), array('controller' => 'benches', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php echo __('Related Events');?></h3>
	<?php if (!empty($match['Event'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Match Id'); ?></th>
		<th><?php echo __('Player Id'); ?></th>
		<th><?php echo __('Event Type Id'); ?></th>
		<th><?php echo __('Minute'); ?></th>
		<th><?php echo __('Description'); ?></th>
		<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($match['Event'] as $event): ?>
		<tr>
			<td><?php echo $event['id'];?></td>
			<td><?php echo $event['match_id'];?></td>
			<td><?php echo $event['player_id'];?></td>
			<td><?php echo $event['event_type_id'];?></td>
			<td><?php echo $event['minute'];?></td>
			<td><?php echo $event['description'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'events', 'action' => 'view', $event['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'events', 'action' => 'edit', $event['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'events', 'action' => 'delete', $event['id']), null, __('Are you sure you want to delete # %s?', $event['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Event'), array('controller' => 'events', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php echo __('Related Line Ups');?></h3>
	<?php if (!empty($match['LineUp'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Player Id'); ?></th>
		<th><?php echo __('Position Id'); ?></th>
		<th><?php echo __('Number'); ?></th>
		<th><?php echo __('Match Id'); ?></th>
		<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($match['LineUp'] as $lineUp): ?>
		<tr>
			<td><?php echo $lineUp['id'];?></td>
			<td><?php echo $lineUp['player_id'];?></td>
			<td><?php echo $lineUp['position_id'];?></td>
			<td><?php echo $lineUp['number'];?></td>
			<td><?php echo $lineUp['match_id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'line_ups', 'action' => 'view', $lineUp['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'line_ups', 'action' => 'edit', $lineUp['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'line_ups', 'action' => 'delete', $lineUp['id']), null, __('Are you sure you want to delete # %s?', $lineUp['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Line Up'), array('controller' => 'line_ups', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
